Timestamp

interface Timestamp

A point in time independent of any time zone or calendar, represented as milliseconds in UTC UNIX Epoch time.

Properties

Link copied to clipboard
The Timestamp from the number of microseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z set to none.

Functions

Link copied to clipboard
open fun fromInstant(instant: Instant): Timestamp
Creates a Timestamp from the given Instant.
Link copied to clipboard
open fun fromMicros(microseconds: Long): Timestamp
Creates a Timestamp from the number of microseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
open fun fromMillis(milliseconds: Long): Timestamp
Creates a Timestamp from the number of milliseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
open fun fromSeconds(seconds: Long): Timestamp
Creates a Timestamp from the number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
open fun toInstant(): Instant
Converts this Timestamp to an Instant.
Link copied to clipboard
open fun toMicros(): Long
Returns the number of microseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
open fun toMillis(): Long
Returns the number of milliseconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
Link copied to clipboard
open fun toSeconds(): Long
Returns the number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.